<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box{
            background-color: yellow;
            width:200px;
            height: 120px;
            margin: 1rem;
            border: solid 1px #333;

            outline: 10px dotted;
            outline-color: invert;
            outline-offset: -10px;
        }
    </style>
</head>
<body>
    <h1>outline</h1>
    <div class="box">
        
    </div>
</body>
</html>